import React from 'react'

interface Props {
  
}

const App = (props: Props) => {
  var arr:number[]=[1,1,1,2,2,2,3]
  var set=new Set(arr)
  
  
  console.log("去重后的数组为")
  console.log(set);
  var newArr:number[]=[];
  set.forEach((i)=>{
    newArr.push(i)
  })
  var sum=newArr.reduce((i,j)=>{
    return i+j
  })
  console.log('去重之后求和为'+sum)
  return (
    <div>
      
    </div>
  )
}

export default App
